home *** CD-ROM | disk | FTP | other *** search
- global gSimObject, gTruckObject, gRollAnimButton
-
- on mouseDown
- if not objectp(gRollAnimButton) and (the status of gTruckObject <> #animating) then
- startBuffering()
- set whichbutton to the clickOn - the firstInvisButChan of gSimObject + 1
- set vector to getAt(the arrowList of gSimObject, whichbutton)
- set cellNum to the cell of gTruckObject + getProp(the moveList of gSimObject, vector)
- surroundStaticSprite(gSimObject, cellNum, the cell of gTruckObject)
- updateStage()
- set hiliteChan to the invisibleButHiliteChan of gSimObject
- set startx to the locH of sprite the clickOn
- set the locH of sprite hiliteChan to startx
- set the locV of sprite hiliteChan to the locV of sprite the clickOn
- set the castNum of sprite hiliteChan to the invisibleButHiliteBmap of gSimObject
- updateStage()
- startTimer()
- set pressed to 1
- repeat while the mouseDown
- if rollOver(the clickOn) then
- if pressed = 0 then
- set the locH of sprite hiliteChan to startx
- updateStage()
- set pressed to 1
- end if
- next repeat
- end if
- if pressed = 1 then
- set the locH of sprite hiliteChan to 1000
- updateStage()
- set pressed to 0
- end if
- end repeat
- if pressed = 1 then
- puppetSound("arrowClick")
- updateStage()
- repeat while soundBusy(1)
- end repeat
- puppetSound(0)
- set the locH of sprite hiliteChan to 1000
- updateStage()
- if the startSimFlag of gSimObject = 1 then
- set the startSimFlag of gSimObject to 0
- end if
- moveTruck(gTruckObject, vector)
- end if
- flushBuffer()
- end if
- end
-